import { useNavigate } from 'react-router-dom'
import './style/index.scss'
import { HOME_URL } from '../../constants'
import { Button, Result } from 'antd'

const NotAuth = () => {
  const navigate = useNavigate()
  const goToHome = () => {
      navigate(HOME_URL)
  }
  return (
    <Result
      status="403"
      title="403"
      subTitle="Sorry, you are not authorized to access this page."
      extra={<Button type="primary" onClick={goToHome}>Back Home</Button>}
    />
  )
}

export default NotAuth